﻿using ERP.ERPSystem.WarehouseManagement.Dto;
using ERP.Team.WarehouseManagement;
using ERP.ERPSystem.ProductionSystem.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace ERP.ERPSystem.WarehouseManagement
{
    /// <summary>
    /// 仓储管理-库存信息-库存现有量-xzc
    /// </summary>
    public interface IInventoryHandServices:IApplicationService
    {
        /// <summary>
        /// 新增库存现有量 
        /// </summary>
        /// <param name="inventoryDto"></param>
        /// <returns></returns>
        Task<int> AddInventory(InventoryDto inventoryDto);
        /// <summary>
        /// 更新库存现有量 
        /// </summary>
        /// <param name="inventoryDto"></param>
        /// <returns></returns>
        Task<int> UpateInventory(InventoryDto inventoryDto);
        /// <summary>
        /// 删除库存现有量 
        /// </summary>
        /// <param name="inventoryDto"></param>
        /// <returns></returns>
        Task DeleteInventory(int id);
        /// <summary>
        /// 查询库存现有量 
        /// </summary>
        /// <param name="getissuingmaterialsdto"></param>
        /// <returns></returns>
        Task<List<Inventory>> GetInventory(GetInventorysDto getinventorysdto);
        /// <summary>
        /// 获取物料分类树形结构
        /// </summary>
        /// <returns></returns>
        Task<List<MaterialTypeTreeDto>> GetMaterialTypeTree();
        /// <summary>
        /// 根据物料分类ID查询库存数据
        /// </summary>
        /// <param name="materialTypeId"></param>
        /// <param name="getinventorysdto"></param>
        /// <returns></returns>
        Task<List<Inventory>> GetInventoryByMaterialType(int? materialTypeId, GetInventorysDto getinventorysdto);
        
        /// <summary>
        /// 根据物料分类ID直接匹配ProductItem查询库存数据
        /// </summary>
        /// <param name="materialTypeId"></param>
        /// <param name="getinventorysdto"></param>
        /// <returns></returns>
        Task<List<Inventory>> GetInventoryByProductItem(int materialTypeId, GetInventorysDto getinventorysdto);
        
        /// <summary>
        /// 获取库存数据和物料分类的调试信息
        /// </summary>
        /// <returns></returns>
        Task<object> GetInventoryDebugInfo();
    }
}
